import 'package:flutter/material.dart';

class Widget_Wrap_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Wrap"),
        ),
        body: Wrap(
          spacing: 5.0,
          runSpacing: 20.0,
          runAlignment: WrapAlignment.end,
          verticalDirection: VerticalDirection.up,
          children: <Widget>[
            Chip(
              label: Text("abcd"),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("A",style: TextStyle(fontSize: 12.0),),
              ),
            ),
            Chip(
              label: Text("abcd"),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Icon(Icons.alarm),
              ),
            ),
            Chip(
              label: Text("abcd"),
              avatar: Icon(Icons.alarm),
            ),
            Chip(
              label: Text("abcd"),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("C",style: TextStyle(fontSize: 12.0),),
              ),
            ),
            Chip(
              label: Text("abcd"),
              padding: EdgeInsets.only(left: 20.0),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("D",style: TextStyle(fontSize: 12.0),),
              ),
            ),
            Chip(
              label: Text("abcd"),
            ),
            Chip(
              label: Text("abcd"),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("C",style: TextStyle(fontSize: 12.0),),
              ),
            ),
            Chip(
              label: Text("abcd"),
              padding: EdgeInsets.only(left: 20.0),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("D",style: TextStyle(fontSize: 12.0),),
              ),
            ),
            Chip(
              label: Text("abcd"),
            ),
            Chip(
              label: Text("abcd"),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("C",style: TextStyle(fontSize: 12.0),),
              ),
            ),
            Chip(
              label: Text("abcd"),
              padding: EdgeInsets.only(left: 20.0),
              avatar: CircleAvatar(
                backgroundColor: Color(0xfff1f1f1),
                child: Text("D",style: TextStyle(fontSize: 12.0),),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

/**
    Wrap({
    Key key,
    this.direction = Axis.horizontal,//主轴（mainAxis）的方向，默认为水平。
    this.alignment = WrapAlignment.start,//主轴方向上的对齐方式，默认为start。
    this.spacing = 0.0,//主轴方向上的间距。
    this.runAlignment = WrapAlignment.start,//run的对齐方式。run可以理解为新的行或者列，如果是水平方向布局的话，run可以理解为新的一行。
    this.runSpacing = 0.0,//run的间距。
    this.crossAxisAlignment = WrapCrossAlignment.start,//交叉轴（crossAxis）方向上的对齐方式。
    this.textDirection,//文本方向。
    this.verticalDirection = VerticalDirection.down,//定义了children摆放顺序，默认是down，见Flex相关属性介绍。
    List<Widget> children = const <Widget>[],//
    })
 */
